import { lazy } from 'react';
import { WapHomeO, FriendsO, AddO ,ShoppingCartO,HomeO} from '@react-vant/icons';
export let mainRoute = [
    {
        path:'/Home/Index',
        element:lazy(()=>import('../Page/Home/Index')),
        txt:'首页',
        icon:WapHomeO
    },
    {
        path:'/Home/Classify',
        element:lazy(()=>import('../Page/Home/Classify')),
        txt:'分类',
        icon:AddO
    },
    {
        path:'/Home/Shop',
        element:lazy(()=>import('../Page/Home/Shop')),
        txt:'购物车',
        icon:ShoppingCartO
    },
    {
        path:'/Home/Me',
        element:lazy(()=>import('../Page/Home/Me')),
        txt:'我的',
        icon:FriendsO
    },
]
const routes = [
    {
        path:'/Home',
        element:lazy(()=>import('../Page/Home')),
        children:mainRoute
    },
    {
        path:'/Login',
        element:lazy(()=>import('../Page/Login'))
    },
    {
        path:'/Detail/:id',
        element:lazy(()=>import('../Page/Detail'))
    },
    {
        path:'/',
        to:'/Home/Index'
    }
]

export default routes